Skip to content

Jump 2 - #2039

Open
AdamTadeusz wants to merge 4 commits into
NeotokyoRebuild:masterfrom
AdamTadeusz:369_jump2
Open

Jump 2#2039
AdamTadeusz wants to merge 4 commits into
NeotokyoRebuild:masterfrom
AdamTadeusz:369_jump2

Conversation

@AdamTadeusz

Copy link
Copy Markdown
Contributor

Description

+jump2 command that does a normal jump without doing a superjump. Personally I bind mwheelup to +jump2 and mwheeldown to +jump

Decided to extend m_nButtons to 64 bits so the PR is a bit involved

Toolchain

  • Windows MSVC VS2022

Linked Issues

  • fixes #

@AdamTadeusz
AdamTadeusz marked this pull request as draft July 30, 2026 22:32
@AdamTadeusz

AdamTadeusz commented Jul 31, 2026

Copy link
Copy Markdown
Contributor Author

There are a lot of places where IN_JUMP is used like CommentarySystem, fourwheelvehiclephysics etc. I'm not going to touch those that we don't use right now

(Edit) only if its not built?

@AdamTadeusz
AdamTadeusz marked this pull request as ready for review July 31, 2026 13:20
@AdamTadeusz
AdamTadeusz requested a review from a team July 31, 2026 13:20
@Rainyan
Rainyan self-requested a review August 8, 2026 15:36

virtual CBaseEntity *OnFailedPhysGunPickup( Vector vPhysgunPos );
virtual void DriveVehicle( float flFrameTime, CUserCmd *ucmd, int iButtonsDown, int iButtonsReleased );
virtual void DriveVehicle( float flFrameTime, CUserCmd *ucmd, int iButtonsDown, int iButtonsReleased ); // NEO TODO (Adam) change to int64 when building this

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: maybe instead of commenting this, add a NEO-ifdef guarded Assert(false) in the impl, so whoever touches this in the future cannot miss the comment without hitting an assert?

virtual void UpdateOnRemove( void );

void DriveCannon( int iDriverButtons, int iButtonsPressed );
void DriveCannon( int iDriverButtons, int iButtonsPressed ); // NEO TODO (Adam) change iDriverButtons and iButtonsPressed to int64 when building this

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: would maybe prefer a hard Assert(false) in the implementation so we don't rely on the comment being seen but rather fail loudly

void CPropJeep::DriveVehicle( float flFrameTime, CUserCmd *ucmd, int iButtonsDown, int iButtonsReleased )
{
int iButtons = ucmd->buttons;
int iButtons = ucmd->buttons; // NEO TODO (Adam) change to int64 when building this

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe ifdef NEO Assert(false) here so this cannot work without the coder noticing & fixing this in the future


// NOTE: Attack2 will be considered to be pressed until the first item is picked up.
int nAttack2Mask = pOwner->m_nButtons & (~m_nAttack2Debounce);
int nAttack2Mask = pOwner->m_nButtons & (~m_nAttack2Debounce); // NEO TODO (Adam) Change to int64 when building this?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Assert(false) so whoever hits this has to deal with it?

void CPropJeep::DriveVehicle( float flFrameTime, CUserCmd *ucmd, int iButtonsDown, int iButtonsReleased )
{
int iButtons = ucmd->buttons;
int iButtons = ucmd->buttons; // NEO TODO (Adam) change to int64 when building this

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ditto on maybe doing Assert(false) or similar here to force a fix for whoever tries to use it

Comment thread src/tier1/bitbuf.cpp
int64 bf_read::ReadSignedVarInt64()
{
uint32 value = ReadVarInt64();
uint32 value = ReadVarInt64(); // NEO TODO (Adam) https://github.com/ValveSoftware/source-sdk-2013/issues/322

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it make sense to fix this retval type 32->64 here as part of this PR, while we're at it modifying this stuff anyway?

@Rainyan
Rainyan requested a review from a team August 8, 2026 16:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants